#cmake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(ln)

SET(LN_MAJOR 1)
SET(LN_MINOR 0)
SET(LN_RELEASE 0)
#SET(LN_NAME ln_${LN_MAJOR}-${LN_MINOR})
SET(LN_NAME ln)
SET(LN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
SET(LN_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

# to distinguish between debug and release lib
SET(CMAKE_DEBUG_POSTFIX "d")

FILE(
    GLOB_RECURSE
    LN_SOURCE_FILES
    ${LN_SRC_DIR}/*
)

FILE(
    GLOB_RECURSE
    LN_INCLUDE_FILES
    ${LN_INCLUDE_DIR}/*.h*
)

INCLUDE_DIRECTORIES(${LN_INCLUDE_DIR})

ADD_EXECUTABLE(
        ${LN_NAME}
        
        ${LN_SOURCE_FILES}
        ${LN_INCLUDE_FILES}
    )

INSTALL( TARGETS ${LN_NAME}
    RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
)
